
Page({

  data: {
    isSelect:false,//展示类型？
    types:['综合排序','离我最近','价格最低'],
    type:"",
    latitude: 0, //首次加载维度
    longitude: 0, //首次加载的经度
    mapName: "湖北省武汉市关山街道软件园东路江钻天然气加...", //选点的位置
    list: [{
          "id": 1,
          "name": "华谊兄弟影院(光谷IMAX店)",
          "place": "洪山区关山大道光谷天地F1坐三层",
          "price": "26",
          "away": "0.9k"
        },
        {
          "id": 2,
          "name": "银兴综艺影院(光谷app广场店)",
          "place": "洪山区南湖大道光谷app广场C座四楼",
          "price": "28",
          "away": "1.3s"
        },
        {
          "id": 3,
          "name": "中影光谷里影城",
          "place": "洪山区高新二路9号北辰光谷里8号楼4层",
          "price": "23.9",
          "away": "1.4"
        },
        {
          "id": 4,
          "name": "锦绣龙城华幕影城",
          "place": "洪山区东湖高新开发区锦绣龙城商业区",
          "price": "28",
          "away": "2"
        },
        {
          "id": 5,
          "name": "银兴国际影城光谷时尚城电",
          "place": "洪山区南湖大道南湖时尚城KBK4楼",
          "price": "33.9",
          "away": "2.1"
        },
        {
          "id": 6,
          "name": "金逸星汇影城(青年城店)",
          "place": "洪山区新竹路光谷青年城1号楼三层",
          "price": "23",
          "away": "2.4"
        },
        {
          "id": 7,
          "name": "恒业影城武汉店",
          "place": "洪山区关山大道332号保利时代广场5层",
          "price": "23",
          "away": "2.5"
        },
        {
          "id": 8,
          "name": "华谊兄弟影院(光谷IMAX店)",
          "place": "洪山区关山大道光谷天地F1坐三层",
          "price": "26",
          "away": "0.9k"
        },
        {
          "id": 9,
          "name": "银兴综艺影院(光谷app广场店)",
          "place": "洪山区南湖大道光谷app广场C座四楼",
          "price": "28",
          "away": "1.3s"
        },
        {
          "id": 10,
          "name": "中影光谷里影城",
          "place": "洪山区高新二路9号北辰光谷里8号楼4层",
          "price": "23.9",
          "away": "1.4"
        },
        {
          "id": 11,
          "name": "锦绣龙城华幕影城",
          "place": "洪山区东湖高新开发区锦绣龙城商业区",
          "price": "28",
          "away": "2"
        },
  ],
  },

  moveToLocation() {
    let that = this
    wx.chooseLocation({
        success: function (res) {
            console.log(res.name);
            //赋值给data中的mapName
            that.setData({
                mapName: res.name
            })
        },
        //错误信息
        fail: function (err) {
            console.log(err);
        }
    })
},
//点击控制下拉框的展示、隐藏
select:function(){
  var isSelect = this.data.isSelect
  this.setData({ isSelect:!isSelect})
  },
  //点击下拉框选项，选中并隐藏下拉框
  getType:function(e){
  let value = e.currentTarget.dataset.type
  this.setData({
  type:value ,
  isSelect: false,
  })
  },

})